<?php
header("Content-Type:text/html;charset=UTF-8"); 
?>
<!DOCTYPE html>
<html>
<head>
	<title>查看所有留言-七中留言板</title>
	<script src="//lib.baomitu.com/jquery/1.12.4/jquery.min.js"></script>
    <script src="//lib.baomitu.com/layer/2.3/layer.js"></script>
 <link rel="stylesheet" type="text/css" href="https://www.layuicdn.com/layui/css/layui.css">
</head>
<body>
<!---导航栏部分--->
<ul class="layui-nav">
	<li class="layui-nav-item"><a href="/index.php">我要留言</a></li>
  <li class="layui-nav-item"><a href="./history.php">查看留言</a></li>
<li class="layui-nav-item"><a href="./update.php">更新历程</a></li>
 <!-- <li class="layui-nav-item"><a href="./">编辑我的留言</a></li>-->
  <li class="layui-nav-item"><a href="http://xz7z.com">七中官网</a></li>
	<!--<li class="layui-nav-item"><a href="./del.php">删除留言</a></li>-->
		
  <li class="layui-nav-item"><a href="./admin">开发者后台</a></li>
</ul>
	<div class="layui-row layui-col-space15">
  <div class="layui-col-md6">
    <div class="layui-panel">
      <div style="padding: 30px;">


<?php
	include 'common.php';
 	//$sql ="SELECT * FROM log  ";
           $sql = 'SELECT * FROM `log` ORDER BY `id` DESC ';
        $res = mysqli_query($conn,$sql);
       
?>
<?php



?>

	<?php
	if(mysqli_num_rows($res) >0) {
		while ($row =mysqli_fetch_assoc($res)) {
                  //echo "id: " . $row["id"]. " - Name: " . $row["name"]. " " . $row["time"]. "<br>";

?>
       <blockquote class="layui-elem-quote" style="margin-top: 30px;">
      			第<span><?php echo $row['id']; ?>楼</span><br>
      			<span >发言内容:</span>
      			<span style="color:red;"><?php echo $row['text']; ?></span> <br>
      			<span >发言人:</span>
      			<span style="color:red;"><?php echo $row['name']?></span><br>
      			留言时间:<span><?php echo $row['time'];?></span>

      		</blockquote>


<?php
}
}else {
echo '暂无留言内容';

}

?>

	



      </div>
    </div>   
  </div>
</body>
</html>
